import store from "@tapui/store"

import Layout from "@tapui/views/layout/Layout"

const addRouterMap = [
  {
    path: "/",
    component: Layout,
    hidden: true,
    redirect: "dashboard",
    children: [
      {
        path: "dashboard",
        component: resolve =>
          require(["../views/ProjectManage/projectIndex/index.vue"], resolve),
        name: "首页",
        meta: { title: "首页", icon: "index", keepAlive: false }
      },
      {
        path: "projectManage/projectInfo/:id",
        component: resolve =>
          require(["../views/ProjectManage/projectInfo/index.vue"], resolve),
        name: "projectInfoIndex",
        meta: { title: "项目信息", icon: "index", keepAlive: false }
      },
      {
        path: "projectManage/pmContract/:id",
        component: resolve =>
          require(["../views/ProjectManage/pmContract/index.vue"], resolve),
        name: "pmContractIndex",
        meta: { title: "合同信息", icon: "index", keeplive: false }
      }
      // {
      //   path: "mainPortal",
      //   component: () => import("@tapui/views/cbo/cboPortalDef/mainPortal"),
      //   name: "首页",
      //   meta: { title: "首页", icon: "index", keepAlive: false }
      // }
    ]
  },
  {
    path: "/dataBigScreen",
    component: resolve =>
      require(["../views/ProjectManage/pmVisualization/index.vue"], resolve),
    hidden: true
  }
]

store.dispatch("MergeRoutes", addRouterMap)
